package lib

import "gitee.com/jamon/espoir_go/common"

type LoginRequest struct {
	UserName string `json:"user_name"`
	Passwd   string `json:"passwd"`
}

type LoginResponse struct {
	UserID uint64 `json:"user_id"`
}

type LogoutRequest struct {
	Reason uint32 `json:"reason"`
}

type LogoutResponse struct {
	Desc string `json:"desc"`
}

type CreateRoomRequest struct {
	GameType uint8 `json:"game_type"`
	RoomType uint8 `json:"room_type"`
}

type CreateRoomResponse struct {
	RoomID string `json:"game_id"`
}

type JoinMatchRoomRequest struct {
	GameType uint8 `json:"game_type",default:"0"`
}

type JoinMatchRoomResponse struct {
	Desc string `json:"desc"`
}

type GameOpRequest struct {
	Op string `json:"op"`
}

type GameOpResponse struct {
	Desc string `json:"desc"`
}

type GameOverRequest struct {
	IsWin bool `json:"is_win"`
}

type GameOverResponse struct {
	Desc string `json:"desc"`
}

type SetReadyRequest struct {
	Status uint8 `json:"status",default:"0"`
}

type SetReadyResponse struct {
	Desc string `json:"desc"`
}

// 推送相关

type StartGamePushData struct {
	RandSeed  int32          `json:"random_seed"`
	TeamUsers []*common.User `json:"team_users"`
}

type EndGamePushData struct {
	RoomID string `json:"game_id"`
	IsWin  bool   `json:"is_win"`
}
